<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<style>table,th,td{border:3px solid black;border-style:solid;border-color:#000}#timeSelector{padding-top:25px;padding-bottom:15px;text-align:center}#bottomCharts{padding:18px}#bottomCharts>div>div>svg{display:block;height:280px}.chartWrapper{border:solid 1px #c7c7c7;width:95%;padding:5px;margin-bottom:18px;display:block;text-align:-webkit-center}.chartWrapper2{border:solid 7px #000000;padding:5px;width:30%;margin-bottom:18px;display:block;text-align:-webkit-center}#bottomTableStats{padding-bottom:20px}#statTable{margin:0 auto;text-align:center;text-transform:capitalize}</style>
<meta http-equiv="refresh" content="600">
<center>
  <br>
                <div class="row">
                                                <div class="col-md-6">
{{? it.stats.balances }}

                                <div class="row"> </div>
                                <div class="row">
                                                        <div class="panel panel-default">
                                                                  <div class="chartWrapper">
                    <div class="chartLabel"><h2><strong>Shift Stats</strong></h2></div>
                            <div class="panel-heading"> <h2><strong><span id="address">{{=it.stats.address}}<span></strong> </h2></div>
                            <div class="chartWrapper2">
                            <div class="pure-u-1-3"><h2>Sha256: <span class="sha256"></span> GH/s</h2>
                            {{ for(var pool in it.stats.pools) { }}
                            {{var workerstat = it.stats.pools[pool].workers[it.stats.address];}}
                            {{if (it.stats.pools[pool].algorithm == "sha256") { }}
                            {{if (workerstat) { }}
<div class="pure-u-1-3"><b>{{=(it.stats.pools[pool].name)}}</b> <span id="sha256{{=it.stats.pools[pool].name}}">{{=workerstat.hashrateString}}</span>/s</div>
                            {{ } }}
                            {{ } }}
                            {{ } }}
                            </div>
                            <div class="pure-u-1-3"><h2>Scrypt: <span class="scrypt"></span> MH/s</h2>
                            {{ for(var pool in it.stats.pools) { }}
                            {{var workerstat = it.stats.pools[pool].workers[it.stats.address];}}
                            {{if (it.stats.pools[pool].algorithm == "scrypt") { }}
                            {{if (workerstat) { }}
<div class="pure-u-1-2"><b>{{=it.stats.pools[pool].name}}</b> <span id="scrypt{{=it.stats.pools[pool].name}}">{{=workerstat.hashrateString}}</span>/s</div><br><br>
                            {{ } }}
                            {{ } }}
                            {{ } }}
                            </div>
                          </div>
<h3><div id="Payout"></div></h3>
                        </div>
                </div>
                                </div> <!-- end row -->
<div>
    <div id="topCharts">
        <div class="chartWrapper">
                    <div class="chartLabel"><h2><strong>Payout History</strong></h2></div>
                            <div class="chartHolder">
                            <div class="row">
                            <div class="table-responsive">
                                <table width="65%">
            <thead>
                <tr>
                 <th><p id="day1"></p></th>
                 <th><p id="day2"></p></th>
                 <th><p id="day3"></p></th>
                 <th><p id="day4"></p></th>
                 <th><p id="day5"></p></th>
                 <th><p id="day6"></p></th>
                 <th><p id="day7"></p></th>
                </tr>
            </thead>
            <!-- // Table heading END -->
            
            <!-- Table body -->
            <tbody align="center">
               <tr>
                <td><strong><span class="stats"></span></strong></td>
                <td><strong><span class="stats1"></span></strong></td>
                <td><strong><span class="stats2"></span></strong></td>
                <td><strong><span class="stats3"></span></strong></td>
                <td><strong><span class="stats4"></span></strong></td>
                <td><strong><span class="stats5"></span></strong></td>
                <td><strong><span class="stats6"></span></strong></td>
               </tr>
            </tbody>
            <!-- // Table body END -->
            
        </table>
        <!-- // Table END -->
<br><br>
    </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>


    <!-- content -->
        <div class="row">

        <!-- main col left -->
        <div class="col-sm-12">
        <div class="chartWrapper">
                               <div class="chartLabel"><h2><strong>Balances:</strong></h2></div>
                    <div class="panel panel-default">
                            <div class="panel-body">
                        <div class="stat-panel row">
                                                              {{ for(var balance in it.stats.balances) { }}
                                                              {{if (it.stats.balances[balance].balance <= 0) { }}
                                                              {{ } else { }}
                            <div class="pure-u-1-5">
                            <div class="panel panel-default col-md-2 col-xs-4">
                            <div class="panel-heading" style="background-color:#3d3d3d;color:white;"><center><span class="text-xs"> {{=it.stats.balances[balance].coin}}</span></center></div>
                            <div class="panel-body"><span class="text-bg"><strong>{{=it.stats.balances[balance].balance}}</strong></span> &nbsp</div>
                            </div>
                        </div>

                                                              {{ } }}
                                                              {{ } }}
                                                                               </div>
                                                                               <br><br>
                        </div>
                    </div>
                </div>
            </div>
        <div class="chartWrapper">
                               <div class="chartLabel"><h2><strong>Paid:</strong></h2></div>
                        <div class="stat-panel row">
                                                              {{ for(var balance in it.stats.balances) { }}
                                                              {{if (it.stats.balances[balance].paid <= 0) { }}
                                                              {{ } else { }}
                            <div class="pure-u-1-5">
                            <div class="panel panel-default col-md-2 col-xs-4">
                            <div class="panel-heading" style="background-color:#3d3d3d;color:white;"><center><span class="text-xs"> {{=it.stats.balances[balance].coin}}</span></center></div>
                            <div class="panel-body"><span class="text-bg"><strong>{{=it.stats.balances[balance].paid}}</strong></span> &nbsp</div>
                            </div>
                            </div>
                                                              {{ } }}
                                                              {{ } }}
                                                                               </div>
                                                                               <br><br>
                        </div>

                </div>




</div>
{{?}}
<script>
window.statsSource = new EventSource("/api/live_stats");
$(function() {
statsSource.addEventListener('message', function (e) {
var a=$("#address").text();
var stats = JSON.parse(e.data);
for (var pool in stats.pools) {
var workerstat = stats.pools[pool].workers[a];
if (stats.pools[pool].algorithm == "scrypt") {
if (workerstat) {
var name = stats.pools[pool].name
$('#scrypt'+name).text(workerstat.hashrateString);
pulseLiveUpdate();
}
}
}
for (var pool in stats.pools) {
var workerstat = stats.pools[pool].workers[a];
if (stats.pools[pool].algorithm == "sha256") {
if (workerstat) {
var name = stats.pools[pool].name
$('#sha256'+name).text(workerstat.hashrateString);
pulseLiveUpdate();
}
}
}
});
});
$(document).ready(function(){var a=$("#address").text();
if (a.startsWith('1')) {
document.getElementById("Payout").innerHTML='<center><p>This shift you have earned: <strong><span class="payout">0.00</span> BTC</strong></p><p>Your previous balance with the pool is currently: <strong><span class="owed"></span> BTC</strong></p><p>Total amount paid to this address: <strong><span class="total">0.00</span> BTC</strong></p></center>';
}
else if (a.startsWith('L')) {
document.getElementById("Payout").innerHTML='<center><p>This shift you have earned: <strong><span class="payout2">0.00</span> LTC</strong></p><p>Your previous balance with the pool is currently: <strong><span class="owed"></span> LTC</strong></p><p>Total amount paid to this address: <strong><span class="total">0.00</span> LTC</strong></p></center>';
}        
else if (a.startsWith('N')) {
document.getElementById("Payout").innerHTML='<center><p>This shift you have earned: <strong><span class="payout1">0.00</span> NEOS</strong></p><p>Your previous balance with the pool is currently: <strong><span class="owed"></span> NEOS</strong></p><p>Total amount paid to this address: <strong><span class="total">0.00</span> NEOS</strong></p></center>';
}
else if (a.startsWith('F')) {
document.getElementById("Payout").innerHTML='<center><p>This shift you have earned: <strong><span class="payout3">0.00</span> FC2</strong></p><p>Your previous balance with the pool is currently: <strong><span class="owed"></span> FC2</strong></p><p>Total amount paid to this address: <strong><span class="total">0.00</span> FC2</strong></p></center>';
}
else if (a.startsWith('Y')) {
document.getElementById("Payout").innerHTML='<center><p>This shift you have earned: <strong><span class="payout4">0.00</span> BSTY</strong></p><p>Your previous balance with the pool is currently: <strong><span class="owed"></span> BSTY</strong></p><p>Total amount paid to this address: <strong><span class="total">0.00</span> BSTY</strong></p></center>';
}
else {
document.getElementById("Payout").innerHTML='<center>Your using an address not supported by the multipool. Please check below for any direct port balances</p></center>';
}
});
</script>





<script>
var d = new Date((new Date()).valueOf() - 1000*3600*24);
document.getElementById("day1").innerHTML = d.toDateString();
var d1 = new Date((new Date()).valueOf() - 1000*3600*24*2);
document.getElementById("day2").innerHTML = d1.toDateString();
var d2 = new Date((new Date()).valueOf() - 1000*3600*24*3);
document.getElementById("day3").innerHTML = d2.toDateString();
var d3 = new Date((new Date()).valueOf() - 1000*3600*24*4);
document.getElementById("day4").innerHTML = d3.toDateString();
var d4 = new Date((new Date()).valueOf() - 1000*3600*24*5);
document.getElementById("day5").innerHTML = d4.toDateString();
var d5 = new Date((new Date()).valueOf() - 1000*3600*24*6);
document.getElementById("day6").innerHTML = d5.toDateString();
var d6 = new Date((new Date()).valueOf() - 1000*3600*24*7);
document.getElementById("day7").innerHTML = d6.toDateString();
</script>
<script type="text/javascript">
ReloadMiner();
setInterval(function(){ReloadMiner()}, 60000);
function ReloadMiner(){
$(function() {
pulseLiveUpdate();
var a=$("#address").text();
$.get("http://stratum.infernopool.com:7379/hget/Pool_Stats:CurrentShift:WorkerBTC/"+a+".txt",function(b){$(".payout").text(parseFloat(b).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/hget/Pool_Stats:CurrentShift:WorkerNEOSCoin/"+a+".txt",function(b){$(".payout1").text(parseFloat(b).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/hget/Pool_Stats:CurrentShift:WorkerLTC/"+a+".txt",function(b){$(".payout2").text(parseFloat(b).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/hget/Pool_Stats:CurrentShift:WorkerFUELCoin/"+a+".txt",function(b){$(".payout3").text(parseFloat(b).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/hget/Pool_Stats:CurrentShift:WorkerBSTYCoin/"+a+".txt",function(b){$(".payout4").text(parseFloat(b).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/hget/Worker_Stats:TotalPaid/"+a+".txt",function(b){$(".total").text(parseFloat(b).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats").text(parseFloat(b.lrange[0]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats1").text(parseFloat(b.lrange[1]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats2").text(parseFloat(b.lrange[2]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats3").text(parseFloat(b.lrange[3]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats4").text(parseFloat(b.lrange[4]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats5").text(parseFloat(b.lrange[5]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/lrange/Worker_Stats:Payouts:"+a+"/0/7",function(b){$(".stats6").text(parseFloat(b.lrange[6]).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/ZSCORE/Pool_Stats:Balances/"+a,function(b){$(".owed").text(parseFloat(b.ZSCORE).toFixed(8));});
$.get("http://stratum.infernopool.com:7379/zrange/Pool_Stats:WorkerHRs:sha256:"+a+"/-1/-1.txt",function(b){$(".sha256").text(parseFloat(b / 2).toFixed(2));});
$.get("http://stratum.infernopool.com:7379/zrange/Pool_Stats:WorkerHRs:scrypt:"+a+"/-1/-1.txt",function(b){$(".scrypt").text(parseFloat(b).toFixed(2));});
});
}
</script>
</center>
